<template>
    <view class="cashbook">
            <view class="global-tab">

                <view @tap="tab(0)" :class="[tabIdx == 0 ? 'on':'']">全部</view>
                <view @tap="tab(1)" :class="[tabIdx == 1 ? 'on':'']" >近三个月</view>
                <view @tap="tab(2)" :class="[tabIdx == 2 ? 'on':'']">近半年</view>
                <view @tap="tab(3)" :class="[tabIdx == 3 ? 'on':'']">近一年</view>
            </view>
            <view class="cashbook-content">
                <view class="account">
                        <view class="item">账户余额</view>
                        <view class="item">￥{{userBalance}}</view>
                </view>
            </view>

 <scroll-view 
    style="height:calc(100vh - 360rpx)"
        class="scroll-y" 
        scroll-y
        refresher-enabled="true"
        @refresherrefresh="onRefresh"
        :refresher-triggered="triggered"
        @scrolltolower="scrolltolower">
            
            <view class="cashbook-list">
                <view class="group" v-for="(item,index) in list" :key="index">
                        <view class="item">

                            <view class="col">
                                <text class="l">交易类型：</text>
                                {{ recordType[item.recordType]  }}
                            </view>

                              <view class="col">
                                <text class="l">订单号：</text>
                                 {{item.recordSn}}
                            </view>

                              <view class="col">
                                <text class="l">时间：</text>
                                {{item.recordPayTime}}
                            </view>
                            
                        </view>

                        <view class="item">
                                ￥{{item.recordAmount}}
                        </view>

                </view>
            </view>
             <PageBottom :LoadingType="loadingType" noMoreStr="抱歉,没有更多订单" noDataStr="抱歉,暂时没有订单"/>
    </scroll-view>    

            <view class="fixed">
                    <view class="btn_02">
                         <navigator url="/finance/pages/record/index" hover-class="none">
                               提现记录
                           </navigator>
                         
                    </view>
                    <view class="btn_01">
                        <navigator :url="`/finance/pages/cashOut/index?salonId=${salonId}`" hover-class="none">
                              申请提现
                           </navigator>
                        </view>
                    
            </view>
    </view>
</template>
<script lang="ts" src="./index.ts">

</script>
<style lang="scss">
@import './_static/scss/index.scss';
</style>